package com.bridgeintelligent.tag.customer.looklike;

import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 定时更新相似客群的有效状态
 */
@AllArgsConstructor
@Component
@Slf4j
public class LookLikeScheduled {

    private ILookLikeService lookLikeService;

    @Scheduled(cron = "0 0 0 * * ? ")
    public void requestCustomersStatus() {
        log.info("------更新相似客群的有效状态任务开始------");
        try {
            lookLikeService.makeExpire();
        }catch (Exception e){
            log.error("------更新相似客群的有效状态任务失败------",e);
        }
    }
}
